home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 March / MacWorld 03:96.toast / Sound / Pet Sounds / Ambiance Distribution / Sound Collection Guidelines < prev   
Text File  |  1995-04-14  |  3KB  |  25 lines

  1. Ambiance
  2. ©1995 by Des Courtney
  3.  
  4. How To Make Custom Sound Collections
  5.  
  6. A Sound Collection consists of the following…
  7.     • A Batch Of Sound Resources
  8.     • A PACE Resource
  9.     • The Resources To Make An Alert
  10.  
  11. Sound Resources
  12.     A sound collection’s “snd ” resources should be small, so as to minimize excessive memory usage. All the sounds are loaded into memory when the file is opened. Sounds that play by looping themselves (see below) should be resource locked. Other sounds should not be resourced locked so the System can move unused sounds when memory fragmentation occurs. The locking status gets preserved when the sounds are moved into “temporary” memory.
  13.     Constucting a looped sound will probably require a means of editing a sound resource’s internal information, specifically its command list. A typical sample sound contains a lone “bufferCmd” which simply plays the sound data once all the way through. To make a sound become looped, this needs to be replaced with a “soundCmd” followed by a “freqCmd.” For compatibility with Sound Manager 2.0, it may be necessary to add some “waitCmd’s” after the freqCmd. Consult Inside Macintosh: Sound for more information.
  14.  
  15. PACE Resource
  16.     A ResEdit template for this resource exists in the Ambiance application itself. It consists of three elements. The first two are the minimum and maximum time between two played sounds. The times are in 1/60’s of a second. The interval between sounds is randomly determined based on this range. If the minimum time is greater than the maximum time, Ambiance only plays one sound when the collection is first opened. This is usually used for sound collections that contain a single looped sound. The last element is a toggle for activating sound playback in a sequential order. If toggled off, the sounds are chosen randomly. If toggled on, the sounds are played back in the order the sounds are in the file. This does not correspond to the ID numbers of the sounds. If you want the sounds to be played back by ID, select all of the sounds in ResEdit, cut, and paste. This reorders the sounds by ID instead of how old each sound is in the file.
  17.  
  18. “Get Info” Alert
  19.     When the user chooses “Get Info” from the File menu, Ambiance attempts to load in an “ALRT” resource of number 327. The “alert levels” of this alert should not activate a system beep, and they should all default to the “OK” button. The “DITL” resource should, of course, have its first element be this button. The button should be the only control. I recommend that for any text that you use, you use black and white “PICT” resources that are made with the Times typeface, 12 point for body text and 18 for headers. This is what is used in the About… alert and this documentation. For color elements, using “cicn” resources to allow you to specify different images for B&W and color systems.
  20.  
  21.  
  22.     The file can also have a “vers” resource for disclosing version and authorship information. Also, the file should be of type “ßfil” and of creator “åµ∫î.”
  23.  
  24. Des Courtney
  25. April 13, 1995